import { BasicColumn, FormSchema } from '@/components/Table';
import { pluginStateEnumMap } from '@/enums/plugin';

export const searchFormSchema: FormSchema[] = [
    {
      field: 'name',
      label: '名称',
      component: 'Input',
      colProps: { span: 6 },
    },
  ];

export const columns: BasicColumn[] = [
    {
      title: '编码',
      dataIndex: 'key',
      width: 80,
    },
    {
      title: '名称',
      dataIndex: 'name',
      width: 120,
    },
    {
      title: '状态',
      dataIndex: 'state',
      width: 80,
      customRender: ({ record }) => {
        return pluginStateEnumMap[record.state];
      },
    },
    {
      title: '发布者',
      dataIndex: 'publisher',
      width: 150,
    },
    {
      title: '简介',
      dataIndex: 'desc',
      width: 200,
    },
  ];